package org.summerframework.component.security.oauth;

/**
 * OAuthInterceptor
 *
 * @author 石超
 * @date 2016/3/25
 */
public interface OAuthInterceptor<D extends AccessToken, I extends Info> {

    D getAccessToken(String code);

    /**
     * 获取当前的accessToken
     *
     * @return
     */
    I getResultInfo(D accessToken);

    /**
     * 获取accessToken,账号下的信息
     *
     * @return
     */
    I getInfo(I info);

    OAuthAppIdAndAppSecret getOAuthInfo();

    boolean supportsType(LoginType loginType);
}
